package com.example.demo.dao;


import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Repository
@Mapper
public interface UserDao {
    @Select("select * from travel_user where username=#{uname} and password=#{pwd}")
    public User login(@Param("uname") String username, @Param("pwd") String password);

    //注册用户
    public int add(User user);

    //根据用户名查找
    public User findByUserName(String username);
    public void update(User user);
}